package org.example.config;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@PropertySource("classpath:/app-config.properties")
@ConfigurationProperties(prefix = "app")
@Configuration
@Data
public class AppProperties {

    private Jwt jwt = new Jwt();
    private Sms sms = new Sms();

    @Setter
    @Getter
    public static class Jwt {
        private long accessJwtExpire;
        private long refreshJwtExpire;
        private String key;
        private String refreshKey;
    }

    @Setter
    @Getter
    public static class Sms {
        private Integer key;
        private String openId;
    }
}
